package com.dura.common.enums;

import lombok.Getter;

/**
 * @version 1.0
 * @Author 振鹏
 * @Date 2025/3/15 21:57
 * @注释
 */
@Getter
public enum ExceptionEnums {

    ERROR_APIKEY(-1,"非法的apikey"),
    IP_NOT_WHITE(-2,"请求的ip不在白名单内"),
    ERROR_SIGN(-3,"无可用签名"),
    ERROR_TEMPLATE(-4,"无可用模板"),
    ERROR_MOBILE(-5,"手机号格式不正确"),
    BALANCE_NOT_ENOUGH(-6,"客户余额不足"),
    PARAMETER_ERROR(-10,"参数不合法！"),
    SNOWFLAKE_OUT_OF_RANGE(-11,"雪花算法的机器id或服务id超出最大范围！"),
    SNOWFLAKE_TIME_BACK(-12,"雪花算法的服务器出现时间回拨问题！"),
    HAVE_DIRTY_WORD(-13,"短信内容含有敏感词！"),
    BLACK_GLOBAL(-14,"手机号在全局黑名单中！"),
    BLACK_CLIENT(-15,"手机号在客户黑名单中！"),
    ONE_MINUTE_LIMIT(-16,"一分钟限流规则生效，无法发送！"),
    ONE_HOUR_LIMIT(-17,"一小时限流规则生效，无法发送！"),
    UNKNOWN_ERROR(-18,"未知异常！"),
    NO_CHANNEL(-19,"没有可用的通道！"),
    SEARCH_INDEX_ERROR(-20,"搜索模块-索引添加失败！"),
    SEARCH_UPDATE_ERROR(-21,"搜索模块-文档修改失败！"),
    NOT_LOGIN(-22,"用户未登录！"),
    AUTHEN_ERROR(-23,"用户名或密码错误！"),
    KAPACHA_ERROR(-24,"验证码不正确！"),
    USER_MENU_ERROR(-25,"获取用户菜单信息失败！"),
    SMS_NO_AUTHOR(-26,"用户没有权限查看该客户的短信信息！"),
    ;
    private Integer code;

    private String msg;

    ExceptionEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}